package com.example.springaop.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
//@RestController
@RequestMapping("/test")
public class AspectTest {
    @RequestMapping("/t1")
    public String test1(){
        log.info("这是目标方法，开始执行");
        return "t1";
    }
   @RequestMapping("/t2")
    public String test2(){
        log.info("这是目标方法，开始执行");
        int a=10/0;
        return "t2";
    }
}
